
package za.ac.cput.peterjohn.DesignPatternPrincipals.Structural.Composite.Model;

public class Leaf implements Component
{
    private String name;

    public Leaf(String name) { this.name = name; }

    @Override
    public String sayHello() { return name + " leaf says hello."; }

    @Override
    public String sayGoodbye() { return name + " leaf says goodbye."; } 
}